from sqlalchemy import Column,Integer,String,Numeric,DateTime
from ..db.session import Base

class AsphaltMixingData(Base):
    __tablename__ = "asphalt_mixing_data"

    id = Column(Integer, primary_key=True, autoincrement=True, index=True) 
    source = Column(String(50), nullable=True, comment="数据来源")
    mpNum = Column(String(50), comment="拌合站编号")
    colTime = Column(DateTime, comment="采集时间")
    remark1 = Column(String(50), comment="出料时间（时间戳）")
    isP = Column(Integer, comment="理论配合比传送方式")
    formula = Column(String(50), comment="配方号")
    lq = Column(Numeric(10, 2), comment="实际沥青质量")
    dischargeTime = Column(DateTime, comment="出料时间")
    stirTime = Column(Numeric(10, 2), comment="湿拌时间分钟数")
    lqTem = Column(Numeric(10, 2), comment="沥青温度")
    stoneTem = Column(Numeric(10, 2), comment="石料温度")
    production = Column(Numeric(10, 2), comment="总重量")
    ar = Column(Numeric(10, 2), comment="实际油石比")
    stone1 = Column(Numeric(10, 2), comment="实际石料1质量")
    stone2 = Column(Numeric(10, 2), comment="实际石料2质量")
    stone3 = Column(Numeric(10, 2), comment="实际石料3质量")
    stone4 = Column(Numeric(10, 2), comment="实际石料4质量")
    stone5 = Column(Numeric(10, 2), comment="实际石料5质量")
    stone6 = Column(Numeric(10, 2), comment="实际石料6质量")
    stone7 = Column(Numeric(10, 2), comment="实际石料7质量")
    ore1 = Column(Numeric(10, 2), comment="实际粉料1质量")
    ore2 = Column(Numeric(10, 2), comment="实际粉料2质量")
    additive = Column(Numeric(10, 2), comment="实际添加剂质量")
    thAr = Column(Numeric(10, 2), comment="理论油石比")
    thStone1 = Column(Numeric(10, 2), comment="理论石料1")
    thStone2 = Column(Numeric(10, 2), comment="理论石料2")
    thStone3 = Column(Numeric(10, 2), comment="理论石料3")
    thStone4 = Column(Numeric(10, 2), comment="理论石料4")
    thStone5 = Column(Numeric(10, 2), comment="理论石料5")
    thStone6 = Column(Numeric(10, 2), comment="理论石料6")
    thStone7 = Column(Numeric(10, 2), comment="理论石料7")
    thOre1 = Column(Numeric(10, 2), comment="理论粉料1")
    thOre2 = Column(Numeric(10, 2), comment="理论粉料2")
    thLq = Column(Numeric(10, 2), comment="理论沥青")
    thAdditive = Column(Numeric(10, 2), comment="理论添加剂")
    dischargeTem = Column(Numeric(10, 2), comment="出料温度")
    createTime = Column(DateTime, comment="创建时间")
    updateTime = Column(DateTime, comment="更新时间")

    def __repr__(self):
        return f"<AsphaltMixingData {self.id}>"